﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using UFIDA.U9.Base.FlexField.DescFlexField;
using UFIDA.U9.CBO.DTOs;
using UFIDA.U9.ISV.PUB.CustZLAPI.Model;
using UFIDA.U9.SM.Ship;
using UFIDA.U9.SM.Ship.Proxy;
using UFSoft.UBF.Business;
using UFSoft.UBF.MVC;
using UFSoft.UBF.Util.Log;

namespace UFIDA.U9.ISV.PUB.CustZLAPI
{
    /// <summary>
    /// 测试接口
    /// </summary>
    public class CustTestController : OpenAPIController
    {
        /// <summary>
        /// 客户签收更新出货单
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        [HttpPost]
        public UFSoft.UBF.MVC.Common.ApiResult<List<resData>> SignIn([FromBody] PramAPIModel param)
        {
            ILogger logger = LoggerManager.GetLogger("CustShipLineFinshController");
            try
            {

                UFIDA.U9.Base.UserRole.User.EntityList use = UFIDA.U9.Base.UserRole.User.Finder.FindAll("");
                List<resData> res = new List<resData>();
                foreach (UFIDA.U9.Base.UserRole.User item in use)
                {
                    res.Add(new resData { code = item.Code });
                }

                return new UFSoft.UBF.MVC.Common.ApiResult<List<resData>>(res);
            }
            catch (Exception ex)
            {
                logger.Error(string.Format("QueryCustomerPageController错误：{0}", ex.StackTrace));
                return new UFSoft.UBF.MVC.Common.ApiResult<List<resData>>(null, -1, ex.Message);
            }
        }
        #region 处理数据

        public class resData
        {
            public string code { get; set; }
        }



        #endregion

    }
}
